import type { AppRouteModule } from '/@/router/types';
import { RoleEnum } from '/@/enums/roleEnum';

import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';

const device: AppRouteModule = {
  path: '/device',
  name: 'device',
  component: LAYOUT,
  redirect: '/device/index',
  meta: {
    orderNo: 700,
    icon: 'ant-design:cluster-outlined',
    title: '设备管理',
    // hideChildrenInMenu: true,//WC
  },
  children: [
    {
      path: 'index',
      name: 'indexManagement',
      meta: {
        title: '设备集成',
        ignoreKeepAlive: true,
        roles: [RoleEnum.indexManagement]
      },
      component: () => import('/@/views/device/index/index.vue'),
    },
    {
      path: 'config',
      name: 'configManagement',
      meta: {
        title: '设备设置',
        ignoreKeepAlive: true,
        roles: [RoleEnum.configManagement]

      },
      component: () => import('/@/views/device/config/index.vue'),
    },
    {
      path: 'debug',
      name: 'debugManagement',
      meta: {
        title: '设备调试',
        ignoreKeepAlive: true,
        // roles: [RoleEnum.debugManagement]

      },
      component: () => import('/@/views/device/debug/index.vue'),
    },
    // {
    //   path: 'limit',
    //   name: 'limitManagement',
    //   meta: {
    //     title: '阈值设置',
    //     ignoreKeepAlive: true,
    //   },
    //   component: () => import('/@/views/device/limit/index.vue'),
    // },
  ],
};

export default device;
